﻿using Common.Utils;
using Domain.Entities.Commons;
using Domain.Shared.Entities;


namespace Domain.Entities.Todos
{
    public class Todo : AuditedAggregateRoot<Guid>
    {
        protected Todo() { }

        public Todo(Guid id, string name, TodoStatus status, string? remark = null)
            : base(id)
        {
            Check.NotNull(name, nameof(name));
            Check.NotNull(status, nameof(status));
            Name = name;
            Status = status;
            Remark = remark;
        }

        /// <summary>
        /// todo title
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 状态，0 undo：，1：done, 2:pending
        /// </summary>
        public TodoStatus Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }
}

